wordlist=["fish","bird","cat","city","polar","fart","toilet","jesse","apple","hello","goodbye","bannana",]
import random
word= random.choice(wordlist)
wordarray=list(word)
length=len(word)
graphic=["""
_
|  
| 
|
|
|
|____________
""","""
_____________
|  /
| /
|/
|
|
|____________
""",
"""
_____________
|  /    
| /
|/
|
|
|____________
""","""
_____________
|  /    |
| /     
|/
|
|
|____________
""","""
_____________
|  /    |
| /     O
|/     
|
|
|____________
""","""
_____________
|  /    |
| /     O
|/     /
|
|
|____________
""","""
_____________
|  /    |
| /     O
|/     /|
|
|
|____________
""","""
_____________
|  /    |
| /     O
|/     /|
|      /
|
|____________
""","""
_____________
|  /    |
| /     O
|/     /|
|      /|
|   !YOU DEAD!
|____________
""","""
_____________
|  /    |
| /     O
|/     /|
|      /|
|   !YOU DEAD!
|____________
"""]
print " Lets Play Hangman :)"
dasharray=list( len(word)*"-")
print  dasharray
wronguess=0
letters=[]
while wronguess<9 or dasharray!=wordarray:
    guess=raw_input("Enter a Lower Case Letter=")
    letters.append(guess)
##    if guess in letters:
##        print "Try again"
##        guess=raw_input("Enter a Lower Case Letter=") 
    print letters
    i=0
    while i<length:
        if wordarray[i]==guess:
            dasharray[i]=guess
            i=i+1
        else:
            i=i+1
    print dasharray
    if guess not in word:
        print graphic[wronguess]
        wronguess=wronguess+1
    if set(wordarray)== set(dasharray):
        print "YOU WIN!!"
        break
    if wronguess==9:
        print "you lose"
        break
